package cn.hquanheng.java_base.day07Test;

public class Programmer extends Employee {

	public Programmer() {
		super();
		kpi=1.2;
	}
	public Programmer(String name, double salary, double kpi) {
		super(name, salary);
		this.kpi = kpi;
	}

	private double kpi;

	public void setKpi(double kpi) {
		this.kpi = kpi;
	}

	public void coding() {
		System.out.println("I'm writting Code!");
	}

	@Override
	public double getSalary() {
		return super.getSalary() * kpi;
	}

	@Override
	public String toString() {
		return "Programmer [" + getName() + ", " + getSalary() + "]";
	}

}
